<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of thanhvien_trangthai_model
 *
 * @author Bui
 */
class Thanhvien_trangthai_model extends CI_Model{
    //put your code here
    public function __construct() {
        parent::__construct();
        $this->load->database();
    }
    public function load_trangthai_from_thanhvien($id)
    {
        $this->db->select('gs7s_thanhvien_trangthai.id,gs7s_thanhvien_trangthai.ten');
        $this->db->from('gs7s_thanhvien');
        $this->db->where('gs7s_thanhvien.id',$id);
        $this->db->limit(1);
        $this->db->join('gs7s_thanhvien_trangthai', 'gs7s_thanhvien_trangthai.id=gs7s_thanhvien.trangthai_id');
        $query=$this->db->get();
        
        return $query->row();
    }
    
}
?>
